package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TKcType;
import com.party.business.mapper.TKcTypeMapper;
import com.party.business.service.ITKcTypeService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 课程分类Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-08
 */
@Service
public class TKcTypeServiceImpl extends ServiceImpl<TKcTypeMapper, TKcType>  implements ITKcTypeService
{
    @Autowired
    private TKcTypeMapper tKcTypeMapper;

    /**
     * 查询课程分类
     *
     * @param id 课程分类主键
     * @return 课程分类
     */
    @Override
    public TKcType selectTKcTypeById(String id)
    {
        return tKcTypeMapper.selectTKcTypeById(id);
    }

    /**
     * 查询课程分类列表
     *
     * @param tKcType 课程分类
     * @return 课程分类
     */
    @Override
    public List<TKcType> selectTKcTypeList(TKcType tKcType)
    {
        return tKcTypeMapper.selectTKcTypeList(tKcType);
    }

    /**
     * 新增课程分类
     *
     * @param tKcType 课程分类
     * @return 结果
     */
    @Override
    public int insertTKcType(TKcType tKcType)
    {
                tKcType.setCreateTime(DateUtils.getNowDate());
            return tKcTypeMapper.insertTKcType(tKcType);
    }

    /**
     * 修改课程分类
     *
     * @param tKcType 课程分类
     * @return 结果
     */
    @Override
    public int updateTKcType(TKcType tKcType)
    {
                tKcType.setUpdateTime(DateUtils.getNowDate());
        return tKcTypeMapper.updateTKcType(tKcType);
    }

    /**
     * 批量删除课程分类
     *
     * @param ids 需要删除的课程分类主键
     * @return 结果
     */
    @Override
    public int deleteTKcTypeByIds(String[] ids)
    {
        return tKcTypeMapper.deleteTKcTypeByIds(ids);
    }

    /**
     * 删除课程分类信息
     *
     * @param id 课程分类主键
     * @return 结果
     */
    @Override
    public int deleteTKcTypeById(String id)
    {
        return tKcTypeMapper.deleteTKcTypeById(id);
    }
}
